Skip to content

Moved on_convar_changed_listener_manager to C++.#414

Merged
jordanbriere merged 3 commits into
Source-Python-Dev-Team:masterfrom
CookStar:on_convar_changed
Sep 24, 2021
Merged

Moved on_convar_changed_listener_manager to C++.#414
jordanbriere merged 3 commits into
Source-Python-Dev-Team:masterfrom
CookStar:on_convar_changed

Conversation

@CookStar

Copy link
Copy Markdown
Contributor

Improved performance and eliminated hooks.

As a backwards compatibility break, when CallGlobalChangeCallbacks is blocked, the listener will no longer be emitted, but I don't think this will have any impact.

If there is a problem, I will reset to the hook.

@jordanbriere jordanbriere left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. The less SP does when idled the better imo. I don't necessarily see an issue with:

As a backwards compatibility break, when CallGlobalChangeCallbacks is blocked, the listener will no longer be emitted, but I don't think this will have any impact.

Since the same could be said for almost any listeners if the functions that trigger them are blocked by a hook that never forward to ours and I don't think that is something we should care about in general. If that was really causing issues, we could always lazily register our hook anyway but I don't see the benefit to that.

Question is, does it works on all games?

Comment thread src/core/modules/listeners/listeners_manager.h Outdated
Comment thread src/core/modules/listeners/listeners_manager.cpp Outdated
@CookStar

Copy link
Copy Markdown
Contributor Author

Question is, does it works on all games?

Since InstallGlobalChangeCallback/RemoveGlobalChangeCallback are old functions (header public/icvar.h has been checked), I assume they will work, but what kind of testing do you perform when you add new functions that depend on Source SDK?

@jordanbriere

Copy link
Copy Markdown
Contributor

Question is, does it works on all games?

Since InstallGlobalChangeCallback/RemoveGlobalChangeCallback are old functions (header public/icvar.h has been checked), I assume they will work, but what kind of testing do you perform when you add new functions that depend on Source SDK?

AM does a pretty good job at maintaining the SDKs so I mainly only ensure that they are declared on all branches, then usually only test on CS:S/CS:GO that the features work, to finally deal with potential issues as they are reported for the others.

@jordanbriere jordanbriere merged commit 9cc17b6 into Source-Python-Dev-Team:master Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants